<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 1. 准备容器，vue会把数据展示到这里 -->
    <div id="app">
        <p>姓名：{{ name }}</p>
        <p>姓名：{{ name.toUpperCase() }}</p>
        <p>age: {{ age }}</p>
        <p>friend's name: {{ friend.name }}</p>
        <p>friend's gender: {{ friend.sex }}</p>
    </div>

    <!-- 2. 导入vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        // 3. 创建 vue 实例对象
        let app = new Vue({
            el: '#app', // 把数据展示到指定的元素里
            data: {
                name: 'blovejin',
                age: 30,
                friend: {
                    sex: 'male',
                    name: 'qiqi'
                }
            }
        })
    </script>
</body>
</html>